package com.pro.common.api.enums.init;

import com.pro.framework.api.enums.EnumToDbEnum;
import com.pro.framework.api.enums.IEnumStr;
import com.pro.framework.api.enums.IEnumToDbEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 三字国家代码（ISO 3166-1 alpha-3）
 */
@Schema(description = "国家")
@Getter
@AllArgsConstructor
@EnumToDbEnum(entityClass = "com.pro.common.service.sitecontent.model.db.Country")
public enum EnumCountry implements IEnumToDbEnum {
    CHN(null, "中国", "中国", "zh", "简体中文", "简体中文", "86", "CHN", "CNY", "¥", BigDecimal.valueOf(1 / 6.8), "Asia/Shanghai", 100, true, true, null),
    USA(null, "United States", "美国", "en", "English", "英语", "1", "USA", "USD", "$", BigDecimal.valueOf(1), "America/New_York", 110, true, true, null),
    GBR(null, "United Kingdom", "英国", "en", "English", "英语", "1", "GBR", "GBP", "£", BigDecimal.valueOf(1), "Europe/London", 200, true, true, null),
    TWN(null, "台灣", "中国台湾", "zh-TW", "繁体中文", "繁体中文", "", "", "TWD", "", BigDecimal.valueOf(1 / 6.8), "Asia/Taipei", 300, true, true, null),
    PRT(null, "Portugal", "葡萄牙", "pt", "Portuguese", "葡萄牙语", "351", "PRT", "EUR", "€", BigDecimal.valueOf(1), "Europe/Lisbon", 270, true, true, null),
    SWE(null, "Sweden", "瑞典", "sv", "Swedish", "瑞典语", "46", "SWE", "SEK", "kr", BigDecimal.valueOf(1), "Europe/Stockholm", 280, true, true, null),
    CHE(null, "Switzerland", "瑞士", "de", "German", "德语", "41", "CHE", "CHF", "CHF", BigDecimal.valueOf(1), "Europe/Zurich", 290, true, true, null),
    GRC(null, "Greece", "希腊", "el", "Greek", "希腊语", "30", "GRC", "EUR", "€", BigDecimal.valueOf(1), "Europe/Athens", 300, true, true, null),
    IRL(null, "Ireland", "爱尔兰", "en", "English", "英语", "353", "IRL", "EUR", "€", BigDecimal.valueOf(1), "Europe/Dublin", 310, true, true, null),
    CYP(null, "Cyprus", "塞浦路斯", "el", "Greek", "希腊语", "357", "CYP", "EUR", "€", BigDecimal.valueOf(1), "Asia/Nicosia", 320, true, true, null),
    SAU(null, "Saudi Arabia", "沙特", "ar", "Arabic", "阿拉伯语", "966", "SAU", "SAR", "﷼", BigDecimal.valueOf(1), "Asia/Riyadh", 330, true, true, null),
    KWT(null, "Kuwait", "科威特", "ar", "Arabic", "阿拉伯语", "965", "KWT", "KWD", "د.ك", BigDecimal.valueOf(1), "Asia/Kuwait", 340, false, true, null),
    NOR(null, "Norway", "挪威", "no", "Norwegian", "挪威语", "47", "NOR", "NOK", "kr", BigDecimal.valueOf(1), "Europe/Oslo", 350, true, true, null),
    CHL(null, "Chile", "智利", "es", "Spanish", "西班牙语", "56", "CHL", "CLP", "$", BigDecimal.valueOf(1), "America/Santiago", 360, true, true, null),
    PHL(null, "Philippines", "菲律宾", "en", "English", "英语", "63", "PHL", "PHP", "₱", BigDecimal.valueOf(1), "Asia/Manila", 370, true, true, null),
    QAT(null, "Qatar", "卡塔尔", "ar", "Arabic", "阿拉伯语", "974", "QAT", "QAR", "﷼", BigDecimal.valueOf(1), "Asia/Qatar", 380, false, true, null),
    JOR(null, "Jordan", "约旦", "ar", "Arabic", "阿拉伯语", "962", "JOR", "JOD", "د.ا", BigDecimal.valueOf(1), "Asia/Amman", 390, false, true, null),
    OMN(null, "Oman", "阿曼", "ar", "Arabic", "阿拉伯语", "968", "OMN", "OMR", "﷼", BigDecimal.valueOf(1), "Asia/Muscat", 400, false, true, null),
    BHR(null, "Bahrain", "巴林", "ar", "Arabic", "阿拉伯语", "973", "BHR", "BHD", "ب.د", BigDecimal.valueOf(1), "Asia/Bahrain", 410, false, true, null),
    ISR(null, "Israel", "以色列", "he", "Hebrew", "希伯来语", "972", "ISR", "ILS", "₪", BigDecimal.valueOf(1), "Asia/Jerusalem", 420, true, true, null),
    ZAF(null, "South Africa", "南非", "en", "English", "英语", "27", "ZAF", "ZAR", "R", BigDecimal.valueOf(1), "Africa/Johannesburg", 430, true, true, null),
    BGR(null, "Bulgaria", "保加利亚", "bg", "Bulgarian", "保加利亚语", "359", "BGR", "BGN", "лв", BigDecimal.valueOf(1), "Europe/Sofia", 440, true, true, null),
    CZE(null, "Czech Republic", "捷克", "cs", "Czech", "捷克语", "420", "CZE", "CZK", "Kč", BigDecimal.valueOf(1), "Europe/Prague", 450, true, true, null),
    HUN(null, "Hungary", "匈牙利", "hu", "Hungarian", "匈牙利语", "36", "HUN", "HUF", "Ft", BigDecimal.valueOf(1), "Europe/Budapest", 460, true, true, null),
    DNK(null, "Denmark", "丹麦", "da", "Danish", "丹麦语", "45", "DNK", "DKK", "kr", BigDecimal.valueOf(1), "Europe/Copenhagen", 470, true, true, null),
    ROU(null, "Romania", "罗马尼亚", "ro", "Romanian", "罗马尼亚语", "40", "ROU", "RON", "lei", BigDecimal.valueOf(1), "Europe/Bucharest", 480, true, true, null),
    BEL(null, "Belgium", "比利时", "nl", "Dutch", "荷兰语", "32", "BEL", "EUR", "€", BigDecimal.valueOf(1), "Europe/Brussels", 490, true, true, null),
    AUT(null, "Austria", "奥地利", "de", "German", "德语", "43", "AUT", "EUR", "€", BigDecimal.valueOf(1), "Europe/Vienna", 500, true, true, null),
    FIN(null, "Finland", "芬兰", "fi", "Finnish", "芬兰语", "358", "FIN", "EUR", "€", BigDecimal.valueOf(1), "Europe/Helsinki", 510, true, true, null),
    SVK(null, "Slovakia", "斯洛伐克", "sk", "Slovak", "斯洛伐克语", "421", "SVK", "EUR", "€", BigDecimal.valueOf(1), "Europe/Bratislava", 520, true, true, null),
    HRV(null, "Croatia", "克罗地亚", "hr", "Croatian", "克罗地亚语", "385", "HRV", "EUR", "€", BigDecimal.valueOf(1), "Europe/Zagreb", 530, true, true, null),
    SVN(null, "Slovenia", "斯洛文尼亚", "sl", "Slovenian", "斯洛文尼亚语", "386", "SVN", "EUR", "€", BigDecimal.valueOf(1), "Europe/Ljubljana", 540, true, true, null),
    LTU(null, "Lithuania", "立陶宛", "lt", "Lithuanian", "立陶宛语", "370", "LTU", "EUR", "€", BigDecimal.valueOf(1), "Europe/Vilnius", 550, true, true, null),
    EST(null, "Estonia", "爱沙尼亚", "et", "Estonian", "爱沙尼亚语", "372", "EST", "EUR", "€", BigDecimal.valueOf(1), "Europe/Tallinn", 560, true, true, null),
    LVA(null, "Latvia", "拉脱维亚", "lv", "Latvian", "拉脱维亚语", "371", "LVA", "EUR", "€", BigDecimal.valueOf(1), "Europe/Riga", 570, true, true, null),
    MLT(null, "Malta", "马耳他", "mt", "Maltese", "马耳他语", "356", "MLT", "EUR", "€", BigDecimal.valueOf(1), "Europe/Malta", 580, true, true, null),
    LUX(null, "Luxembourg", "卢森堡", "fr", "French", "法语", "352", "LUX", "EUR", "€", BigDecimal.valueOf(1), "Europe/Luxembourg", 590, true, true, null),
    PER(null, "Peru", "秘鲁", "es", "Spanish", "西班牙语", "51", "PER", "PEN", "S/", BigDecimal.valueOf(1), "America/Lima", 600, true, true, null),
    COL(null, "Colombia", "哥伦比亚", "es", "Spanish", "西班牙语", "57", "COL", "COP", "$", BigDecimal.valueOf(1), "America/Bogota", 610, true, true, null),
    GEO(null, "Georgia", "格鲁吉亚", "ka", "Georgian", "格鲁吉亚语", "995", "GEO", "GEL", "₾", BigDecimal.valueOf(1), "Asia/Tbilisi", 620, true, true, null),
    ECU(null, "Ecuador", "厄瓜多尔", "es", "Spanish", "西班牙语", "593", "ECU", "USD", "$", BigDecimal.valueOf(1), "America/Guayaquil", 630, true, true, null),
    CAN(null, "Canada", "加拿大", "en", "English", "英语", "1", "CAN", "CAD", "$", BigDecimal.valueOf(1), "America/Toronto", 110, true, true, null),
    AUS(null, "Australia", "澳大利亚", "en", "English", "英语", "61", "AUS", "AUD", "$", BigDecimal.valueOf(1), "Australia/Sydney", 120, true, true, null),
    NZL(null, "New Zealand", "新西兰", "en", "English", "英语", "64", "NZL", "NZD", "$", BigDecimal.valueOf(1), "Pacific/Auckland", 130, true, true, null),
    DEU(null, "Germany", "德国", "de", "German", "德语", "49", "DEU", "EUR", "€", BigDecimal.valueOf(1), "Europe/Berlin", 140, true, true, null),
    FRA(null, "France", "法国", "fr", "French", "法语", "33", "FRA", "EUR", "€", BigDecimal.valueOf(1), "Europe/Paris", 150, true, true, null),
    ITA(null, "Italy", "意大利", "it", "Italian", "意大利语", "39", "ITA", "EUR", "€", BigDecimal.valueOf(1), "Europe/Rome", 160, true, true, null),
    NLD(null, "Netherlands", "荷兰", "nl", "Dutch", "荷兰语", "31", "NLD", "EUR", "€", BigDecimal.valueOf(1), "Europe/Amsterdam", 170, true, true, null),
    ESP(null, "Spain", "西班牙", "es", "Spanish", "西班牙语", "34", "ESP", "EUR", "€", BigDecimal.valueOf(1), "Europe/Madrid", 180, true, true, null),
    JPN(null, "Japan", "日本", "ja", "Japanese", "日语", "81", "JPN", "JPY", "¥", BigDecimal.valueOf(1), "Asia/Tokyo", 190, true, true, null),
    KOR(null, "South Korea", "韩国", "ko", "Korean", "韩语", "82", "KOR", "KRW", "₩", BigDecimal.valueOf(1), "Asia/Seoul", 200, true, true, null),
    SGP(null, "Singapore", "新加坡", "en", "English", "英语", "65", "SGP", "SGD", "$", BigDecimal.valueOf(1), "Asia/Singapore", 210, true, true, null),
    MYS(null, "Malaysia", "马来西亚", "ms", "Malay", "马来语", "60", "MYS", "MYR", "RM", BigDecimal.valueOf(1), "Asia/Kuala_Lumpur", 220, true, true, null),
    THA(null, "Thailand", "泰国", "th", "Thai", "泰语", "66", "THA", "THB", "฿", BigDecimal.valueOf(1), "Asia/Bangkok", 230, true, true, null),
    VNM(null, "Vietnam", "越南", "vi", "Vietnamese", "越南语", "84", "VNM", "VND", "₫", BigDecimal.valueOf(1), "Asia/Ho_Chi_Minh", 240, true, true, null),
    MEX(null, "Mexico", "墨西哥", "es", "Spanish", "西班牙语", "52", "MEX", "MXN", "$", BigDecimal.valueOf(1), "America/Mexico_City", 250, true, true, null),
    BRA(null, "Brazil", "巴西", "pt", "Portuguese", "葡萄牙语", "55", "BRA", "BRL", "R$", BigDecimal.valueOf(1), "America/Sao_Paulo", 260, true, true, null),
    ARE(null, "United Arab Emirates", "阿拉伯联合酋长国", "ar", "Arabic", "阿拉伯语", "971", "ARE", "AED", "د.إ", BigDecimal.valueOf(1), "Asia/Dubai", 280, true, true, null),
    POL(null, "Poland", "波兰", "pl", "Polish", "波兰语", "48", "POL", "PLN", "zł", BigDecimal.valueOf(1), "Europe/Warsaw", 290, true, true, null),
    IND(null, "India", "印度", "hi", "Hindi", "印地语", "91", "IND", "INR", "₹", BigDecimal.valueOf(1), "Asia/Kolkata", 640, true, true, null),
    IDN(null, "Indonesia", "印度尼西亚", "id", "Indonesian", "印尼语", "62", "IDN", "IDR", "Rp", BigDecimal.valueOf(1), "Asia/Jakarta", 650, true, true, null),
    HKG(null, "Hong Kong", "中国香港", "zh-HK", "Chinese", "中文", "852", "HKG", "HKD", "HK$", BigDecimal.valueOf(1), "Asia/Hong_Kong", 660, true, true, null),
    TUR(null, "Turkey", "土耳其", "tr", "Turkish", "土耳其语", "90", "TUR", "TRY", "₺", BigDecimal.valueOf(1), "Europe/Istanbul", 670, true, true, null),
    ARG(null, "Argentina", "阿根廷", "es", "Spanish", "西班牙语", "54", "ARG", "ARS", "$", BigDecimal.valueOf(1), "America/Argentina/Buenos_Aires", 680, true, true, null),
    EGY(null, "Egypt", "埃及", "ar", "Arabic", "阿拉伯语", "20", "EGY", "EGP", "£", BigDecimal.valueOf(1), "Africa/Cairo", 690, true, true, null),
    MAR(null, "Morocco", "摩洛哥", "ar", "Arabic", "阿拉伯语", "212", "MAR", "MAD", "د.م.", BigDecimal.valueOf(1), "Africa/Casablanca", 700, true, true, null),
    RUS(null, "Russia", "俄罗斯", "ru", "Russian", "俄语", "7", "RUS", "RUB", "₽", BigDecimal.valueOf(1), "Europe/Moscow", 710, true, true, null),
    PAK(null, "Pakistan", "巴基斯坦", "ur", "Urdu", "乌尔都语", "92", "PAK", "PKR", "₨", BigDecimal.valueOf(1), "Asia/Karachi", 830, true, true, null),
    LKA(null, "Sri Lanka", "斯里兰卡", "si", "Sinhala", "僧伽罗语", "94", "LKA", "LKR", "Rs", BigDecimal.valueOf(1), "Asia/Colombo", 840, true, true, null),

    // Special sites
    EUR_ROE(null, "Europe ROE", "欧洲ROE站", "en", "English", "英语", "", "EUR", "EUR", "€", BigDecimal.valueOf(1), "Europe/Brussels", 720, true, true, null),
    EUR_QS(null, "Europe QS", "欧洲QS站", "en", "English", "英语", "", "EUR", "EUR", "€", BigDecimal.valueOf(1), "Europe/Brussels", 730, true, true, null),
    EUR_SEU(null, "Europe SEU", "欧洲清仓站", "en", "English", "英语", "", "EUR", "EUR", "€", BigDecimal.valueOf(1), "Europe/Brussels", 740, true, true, null),
    EUR_ALL(null, "Europe All", "欧洲站", "en", "English", "英语", "", "EUR", "EUR", "€", BigDecimal.valueOf(1), "Europe/Brussels", 750, true, true, null),
    USA_LITE(null, "USA Lite", "轻量化美国站", "en", "English", "英语", "1", "USA", "USD", "$", BigDecimal.valueOf(1), "America/New_York", 760, true, true, null),
    USA_OUTLET(null, "USA Outlet", "美国清仓站", "en", "English", "英语", "1", "USA", "USD", "$", BigDecimal.valueOf(1), "America/New_York", 770, true, true, null),
    SNS(null, "South China", "南沙清仓站", "zh", "Chinese", "中文", "", "CHN", "CNY", "¥", BigDecimal.valueOf(1), "Asia/Shanghai", 780, true, true, null),
    FUNMART(null, "Funmart", "Funmart", "zh", "Chinese", "中文", "", "CHN", "CNY", "¥", BigDecimal.valueOf(1), "Asia/Shanghai", 790, true, true, null),
    ASIA(null, "Asia", "亚洲站", "en", "English", "英语", "", "ASIA", "USD", "$", BigDecimal.valueOf(1), "Asia/Singapore", 800, true, true, null),
    INTL(null, "International", "国际站", "en", "English", "英语", "", "INTL", "USD", "$", BigDecimal.valueOf(1), "UTC", 810, true, true, null),
    ARAB(null, "Arab", "阿拉伯站", "ar", "Arabic", "阿拉伯语", "", "ARAB", "USD", "$", BigDecimal.valueOf(1), "Asia/Riyadh", 820, true, true, null),
    ;
    private final String icon;
    private final String countryName;
    private final String cname;
    private final String langCode;
    private final String langName;
    private final String langCnName;
    private final String phoneCode;
    private final String countryCode;
    private final String currencyCode;
    private final String currencySymbol;
    private final BigDecimal exchangeRate;
    private final String zoneCode;
    private final Integer sort;
    private final Boolean enabled;
    private final Boolean showAdmin;
    private final String forceChangeTime;

    @Override
    public String getLabel() {
        return cname;
    }

    public static final Map<String, EnumCountry> MAP = IEnumStr.getMap(values());

    public static void main(String[] args) {
        for (EnumCountry value : values()) {
            System.out.println("\""+value.name() +"\""+ ":" + "\""+value.getCurrencyCode()+"\",");
        }
    }
}
//CHN 中国
//USA 美国
//GBR 英国
//TWN 中国台湾
//PRT 葡萄牙
//SWE 瑞典
//CHE 瑞士
//GRC 希腊
//IRL 爱尔兰
//CYP 塞浦路斯
//SAU 沙特
//KWT 科威特
//NOR 挪威
//CHL 智利
//PHL 菲律宾
//QAT 卡塔尔
//JOR 约旦
//OMN 阿曼
//BHR 巴林
//ISR 以色列
//ZAF 南非
//BGR 保加利亚
//CZE 捷克
//HUN 匈牙利
//DNK 丹麦
//ROU 罗马尼亚
//BEL 比利时
//AUT 奥地利
//FIN 芬兰
//SVK 斯洛伐克
//HRV 克罗地亚
//SVN 斯洛文尼亚
//LTU 立陶宛
//EST 爱沙尼亚
//LVA 拉脱维亚
//MLT 马耳他
//LUX 卢森堡
//PER 秘鲁
//COL 哥伦比亚
//GEO 格鲁吉亚
//ECU 厄瓜多尔
//CAN 加拿大
//AUS 澳大利亚
//NZL 新西兰
//DEU 德国
//FRA 法国
//ITA 意大利
//NLD 荷兰
//ESP 西班牙
//JPN 日本
//KOR 韩国
//SGP 新加坡
//MYS 马来西亚
//THA 泰国
//VNM 越南
//MEX 墨西哥
//BRA 巴西
//ARE 阿拉伯联合酋长国
//POL 波兰
//IND 印度
//IDN 印度尼西亚
//HKG 中国香港
//TUR 土耳其
//ARG 阿根廷
//EGY 埃及
//MAR 摩洛哥
//RUS 俄罗斯
//PAK 巴基斯坦
//LKA 斯里兰卡